package hl.model;
// Generated 2018-5-23 16:07:15 by Hibernate Tools 4.3.5.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TPlace generated by hbm2java
 */
@Entity
@Table(name = "t_place", catalog = "matcha_gym")
public class TPlace implements java.io.Serializable {

	private Long pkPlace;
	private TVenueInfo TVenueInfo;
	private String name;
	private Integer max;
	private Date cdatetime;
	private Date mdatetime;
	private Set<TTraining> TTrainings = new HashSet<TTraining>(0);
	private Set<TEquip> TEquips = new HashSet<TEquip>(0);
	private Set<TGroupCourse> TGroupCourses = new HashSet<TGroupCourse>(0);

	public TPlace() {
	}

	public TPlace(TVenueInfo TVenueInfo, String name, Integer max, Date cdatetime, Date mdatetime,
			Set<TTraining> TTrainings, Set<TEquip> TEquips, Set<TGroupCourse> TGroupCourses) {
		this.TVenueInfo = TVenueInfo;
		this.name = name;
		this.max = max;
		this.cdatetime = cdatetime;
		this.mdatetime = mdatetime;
		this.TTrainings = TTrainings;
		this.TEquips = TEquips;
		this.TGroupCourses = TGroupCourses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "PK_PLACE", unique = true, nullable = false)
	public Long getPkPlace() {
		return this.pkPlace;
	}

	public void setPkPlace(Long pkPlace) {
		this.pkPlace = pkPlace;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PK_VENUE_INFO")
	public TVenueInfo getTVenueInfo() {
		return this.TVenueInfo;
	}

	public void setTVenueInfo(TVenueInfo TVenueInfo) {
		this.TVenueInfo = TVenueInfo;
	}

	@Column(name = "NAME", length = 45)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "MAX")
	public Integer getMax() {
		return this.max;
	}

	public void setMax(Integer max) {
		this.max = max;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CDATETIME", length = 19)
	public Date getCdatetime() {
		return this.cdatetime;
	}

	public void setCdatetime(Date cdatetime) {
		this.cdatetime = cdatetime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "MDATETIME", length = 19)
	public Date getMdatetime() {
		return this.mdatetime;
	}

	public void setMdatetime(Date mdatetime) {
		this.mdatetime = mdatetime;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "TPlace")
	public Set<TTraining> getTTrainings() {
		return this.TTrainings;
	}

	public void setTTrainings(Set<TTraining> TTrainings) {
		this.TTrainings = TTrainings;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "TPlace")
	public Set<TEquip> getTEquips() {
		return this.TEquips;
	}

	public void setTEquips(Set<TEquip> TEquips) {
		this.TEquips = TEquips;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "TPlace")
	public Set<TGroupCourse> getTGroupCourses() {
		return this.TGroupCourses;
	}

	public void setTGroupCourses(Set<TGroupCourse> TGroupCourses) {
		this.TGroupCourses = TGroupCourses;
	}

}
